<html>

<head>
<meta name=标题 content="">
<meta name=关键词 content="">
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:"Courier New";
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Times;
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@DengXian";}
@font-face
	{font-family:"Microsoft YaHei";
	panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
	{font-family:Menlo;
	panose-1:2 11 6 9 3 8 4 2 2 4;}
@font-face
	{font-family:"\@Microsoft YaHei";}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:12.0pt;
	font-family:DengXian;}
code
	{font-family:Courier;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:21.0pt;
	font-size:12.0pt;
	font-family:DengXian;}
p.a, li.a, div.a
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:200%;
	font-size:12.0pt;
	font-family:"Microsoft YaHei";}
.MsoChpDefault
	{font-family:DengXian;}
 /* Page Definitions */
@page WordSection1
	{size:595.0pt 842.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=ZH-CN style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-size:14.0pt;line-height:200%;font-family:"Microsoft YaHei"'>chmod</span></b></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>改变文件或者目录的权限，可以用数字或者字母来标识权限。在数字模式下：<span
lang=EN-US>0</span>，代表没有权限；<span lang=EN-US>1</span>，代表可执行；<span lang=EN-US>2</span>，代表可读；<span
lang=EN-US>4</span>，代表可写；多个权限可以相加。在字符模式下：<span lang=EN-US>x</span>，代表执行；<span
lang=EN-US>r</span>，代表读；<span lang=EN-US>w</span>，代表写；<span lang=EN-US>g</span>，代表组权限；<span
lang=EN-US>o</span>，代表组内其他用户权限；<span lang=EN-US>u</span>，代表用户权限<span
lang=EN-US>ls</span>命令中，看到的权限分别是：用户权限、组权限、组内其他用户权限。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>此命令的适用范围：<span
lang=EN-US>RedHat</span>、<span lang=EN-US>RHEL</span>、<span lang=EN-US>Ubuntu</span>、<span
lang=EN-US>CentOS</span>、<span lang=EN-US>SUSE</span>、<span lang=EN-US>openSUSE</span>、<span
lang=EN-US>Fedora</span>。</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>1</span><span style='font-family:"Microsoft YaHei"'>、语法</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>     <b>chmod  [</b></span><b><span style='font-family:"Microsoft YaHei"'>选项<span
lang=EN-US>]  mode  file</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chmod  [</span></b><b><span
style='font-family:"Microsoft YaHei"'>选项<span lang=EN-US>]  </span>八进制模式  <span
lang=EN-US>file</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chmod  [</span></b><b><span
style='font-family:"Microsoft YaHei"'>选项<span lang=EN-US>]  –reference=RFILE  file</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></b></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>2</span></b><b><span style='font-family:
"Microsoft YaHei"'>、选项列表</span></b></p>

<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>选项</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border:solid windowtext 1.0pt;
  border-left:none;background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>说明</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--version</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示命令版本信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--help</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示帮助文档</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-c | --changes</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>和<span
  lang=EN-US>verbose</span>一样，但是只有在发生改变的时候才显示详细信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--preserve-root</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>禁止对根目录递归炒作</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--no-preserve-root</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>不特殊对待根目录，默认值</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-f | --silent | --quiet</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>忽略部分错误信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--reference=file</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>使用关联文件所属的组</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-v | --verbose</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示详细信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-R | --recursive</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>用递归的方式改变所有的目录和子目录</span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>3</span></b><b><span style='font-family:
"Microsoft YaHei"'>、说明</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chmod</span><span
style='font-family:"Microsoft YaHei"'>根据模式更改每个给定文件的文件模式位，该模式可以是要进行的更改的符号表示，也可以是表示新模式位的位模式的八进制数。符号模式的格式是<span
lang=EN-US>[ugoa...][[+-=][perms...]...]</span>，其中<span lang=EN-US>perms</span>为集合<span
lang=EN-US>rwxXst</span>的零个或多个字母，或来自结合<span lang=EN-US>ugo</span>的单个字母。可以给出多种符号模式，用逗号分隔。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>字母<span lang=EN-US>ugoa</span>控制哪些用户访问文件的权限将被更改：<span
lang=EN-US>(u)</span>拥有该文件的用户、（<span lang=EN-US>g</span>）文件组中的其他用户、（<span
lang=EN-US>o</span>）不属于文件组的其他用户或所有用户<span lang=EN-US>(A)</span>。如果所有这些都没有给出，那么效果就好像给定了“<span
lang=EN-US>a</span>”，但是在<span lang=EN-US>umask</span>中设置的位不受影响。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>运算符‘<span lang=EN-US>+</span>’使所选的文件模式位被添加到每个文件的现有文件模式位中；‘<span
lang=EN-US>-</span>’使它们被删除；<span lang=EN-US>‘=</span>‘使它们被添加，并使未提及的位被删除，除非目录的未提及的设置用户和组<span
lang=EN-US>ID</span>位不受影响。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>字母“<span lang=EN-US>rwxXst</span>”为受影响的用户选择文件模式位：<span
lang=EN-US>(r)</span>读、<span lang=EN-US>(w)</span>写、<span lang=EN-US>(x)</span>执行<span
lang=EN-US>(</span>或搜索目录<span lang=EN-US>)</span>、<span lang=EN-US>(X)</span>只在文件是目录或已对某些用户具有执行权限、<span
lang=EN-US>(s)</span>在执行时设置用户或组<span lang=EN-US>ID</span>、<span lang=EN-US>(t)</span>限制删除标志或粘性位时执行<span
lang=EN-US>/</span>搜索。您可以指定“<span lang=EN-US>ugo</span>”其中的一个或多个字母：<span
lang=EN-US>(u)</span>授予拥有文件的用户的权限，<span lang=EN-US>(g)</span>授予属于文件组的其他用户的权限，<span
lang=EN-US>(o)</span>授予上述两个类别中任何一个用户的权限。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>数字模式是<span lang=EN-US>1</span>到<span
lang=EN-US>4</span>个八进制数字<span lang=EN-US>(0-7)</span>，通过将值<span lang=EN-US>4</span>、<span
lang=EN-US>2</span>和<span lang=EN-US>1</span>的位相加而得。省略的数字被假定为前导零。第一个数字选择设置用户<span
lang=EN-US>ID(4)</span>和设置组<span lang=EN-US>ID(2)</span>，并限制删除或粘贴<span
lang=EN-US>(1)</span>属性。第二位数为拥有该文件的用户选择权限：读<span lang=EN-US>(4)</span>、写<span
lang=EN-US>(2)</span>和执行<span lang=EN-US>(1)</span>；第三位数选择文件组中具有相同值的其他用户的权限；第四位数字选择对不属于文件组的其他用户具有相同值的权限。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chmod</span><span
style='font-family:"Microsoft YaHei"'>从不更改符号链接的权限；<span lang=EN-US>chmod</span>系统调用不能更改它们的权限。这不是一个问题，因为符号链接的权限从未被使用过。但是，对于命令行中列出的每个符号链接，<span
lang=EN-US>chmod</span>会更改指向文件的权限。相反，<span lang=EN-US>chmod</span>忽略递归目录遍历过程中遇到的符号链接。</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>4</span></b><b><span style='font-family:
"Microsoft YaHei"'>、设置<span lang=EN-US>uid</span>和<span lang=EN-US>gid</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>如果文件的组<span lang=EN-US>ID</span>与用户的有效组<span
lang=EN-US>ID</span>或用户的辅助组<span lang=EN-US>ID</span>不匹配，则<span lang=EN-US>chmod</span>将清除常规文件的“<span
lang=EN-US>set-group-ID</span>”位，除非用户具有适当的权限。附加限制可能导致<span lang=EN-US>MODE</span>或<span
lang=EN-US>RFILE</span>的“<span lang=EN-US>set-user-ID</span>”和“<span
lang=EN-US>set-group-ID</span>”位被忽略<span lang=EN-US>.</span>此行为取决于底层<span
lang=EN-US>chmod</span>系统调用的策略和功能。当有疑问时，检查底层系统行为。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chmod</span><span
style='font-family:"Microsoft YaHei"'>保留目录的“<span lang=EN-US>set-user-ID</span>”和“<span
lang=EN-US>set-group-ID</span>”位，除非您显式地另外指定。您可以使用“<span lang=EN-US>u+s</span>”和“<span
lang=EN-US>g-s</span>”这样的符号模式设置或清除位，也可以用数字模式设置<span lang=EN-US>(</span>但不清楚<span
lang=EN-US>)</span>这些位。</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>5</span></b><b><span style='font-family:
"Microsoft YaHei"'>、限制删除标志或粘性位</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>受限制的删除标志或粘性位是一个位，其解释取决于文件类型。对于目录，它防止非特权用户删除或重命名目录中的文件，除非他们拥有该文件或目录；这称为目录的限制删除标志，通常在<span
lang=EN-US>/tmp</span>之类的可写目录中找到。对于一些旧系统上的常规文件，这一位将程序的文本映像保存在交换设备上，以便在运行时更快地加载；这称为粘性位。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>6</span></b><b><span style='font-family:
"Microsoft YaHei"'>、实例</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）修改文件的权限为最大值</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>chmod 777 1.c</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>You have new mail
  in /var/spool/mail/root</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>ls -l 1.c</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><b><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-rwxrwxrwx </span></b></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>1 root
  weijie 0 9</span></code><code><span style='font-size:10.0pt;line-height:200%;
  font-family:DengXian'>月</span></code><code><span lang=EN-US style='font-size:
  10.0pt;line-height:200%;font-family:Menlo'>   7 09:11 1.c</span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）设置组和其他用户只读，使用字符模式设置</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>chmod 777 1.c           //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>改为最大权限</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>ls -l 1.c</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><b><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-rwxrwxrwx </span></b></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>1 root
  weijie 0 9</span></code><code><span style='font-size:10.0pt;line-height:200%;
  font-family:DengXian'>月</span></code><code><span lang=EN-US style='font-size:
  10.0pt;line-height:200%;font-family:Menlo'>   7 09:11 1.c</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>chmod go+r 1.c          //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>修改组、其他用户权限</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>ls -l 1.c</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><b><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-rwxrwxrwx</span></b></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'> 1
  root weijie 0 9</span></code><code><span style='font-size:10.0pt;line-height:
  200%;font-family:DengXian'>月</span></code><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>   7 09:11 1.c    
  <b>//</b></span></code><code><b><span style='font-size:10.0pt;line-height:
  200%;font-family:DengXian'>这里没有效果</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>&nbsp;</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>chmod 700 1.c          //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>组、其他用户权限为</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>0</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>chmod go+r 1.c         //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>组、其他用户增加读权限</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]#<b> ls -l 1.c</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><b><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-rwxr--r-- 1 </span></b></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>root
  weijie 0 9</span></code><code><span style='font-size:10.0pt;line-height:200%;
  font-family:DengXian'>月</span></code><code><span lang=EN-US style='font-size:
  10.0pt;line-height:200%;font-family:Menlo'>   7 09:11 1.c    //</span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>成功。可以看到使用字符模式的时候，权限是一种或的算法，而不是直接赋值</span></b></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal align=center style='text-align:center;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>Copyright@david  zhytwj2018@163.com</span></p>

</div>

</body>

</html>
